export async function lineConnector(
  rowData: {
    data: Uint8ClampedArray;
    width: number;
  }[],
  y: number,
  width: number
) {
  const length = rowData.length;
  const buffer = new ArrayBuffer(width);
  const dataView = new DataView(buffer);
  let index = 0;
  for (let i = 0; i < length; i++) {
    for (let j = 0; j < rowData[i].width; j++) {
      dataView.setInt8(index, rowData[i].data[j + y * rowData[i].width]);
      index++;
    }
  }
  return buffer;
}
